package com.xizi.leetcode周赛;

public class _5767检查是否区域内所有整数都被覆盖 {
    public static void main(String[] args) {

    }

    public boolean isCovered(int[][] ranges, int left, int right) {
        for (int i = left; i <= right; i++) {
            boolean flag = false;
            for (int j = 0; j < ranges.length; j++) {
                if (ranges[j][1] >= i && ranges[j][0] <= i) {
                    flag = true;
                    break;
                }
            }
            if (!flag) {
                return false;
            }
        }
        return true;
    }
}
